<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
header("Access-Control-Allow-Origin:*");
/* @var $this yii\web\View */
/* @var $form yii\widgets\ActiveForm */
/* @var $model app\models\LoginForm */

$this->title = '预算控制';
?>
<?=Html::cssFile('@web/css/common.css')?>
<?=Html::cssFile('@web/css/budCtrl.css')?>
<?=Html::cssFile('@web/css/HomePage.css')?>
<?=Html::jsFile('@web/js/jquery-1.11.3.min.js')?>
<?=Html::jsFile('@web/js/Home.js')?>
<?=Html::jsFile('@web/js/Organizer.js')?>

<body>
<script type="text/javascript">
    function show(tag) {
        var light = document.getElementById(tag);
        var fade = document.getElementById('fade');
        light.style.display = 'block';
        fade.style.display = 'block';
    }

    function hide(tag) {
        var light = document.getElementById(tag);
        var fade = document.getElementById('fade');
        light.style.display = 'none';
        fade.style.display = 'none';
    }
</script>
<!--顶部栏-->
<!--头部导航-->
<?php include_once'../views/public/header.php';?>

<div id="fade" class="black_overlay"></div>
<!--中间主体内容-->
<div class="budCtrl-center">
    <div class="budCtrl-center-con">
        <table>
            <thead>
            <tr>
                <th></th>
                <th>文件名</th>
                <th>发票类型</th>
                <th>发票所属人</th>
                <th>发票日期</th>
                <th>发票金额</th>
                <th>票据详情</th>
                <th>报销人</th>
                <th>状态</th>
            </tr>
            </thead>
            <tbody>
            <?php foreach($vdata as $v){ ?>
            <tr>
                <td><span><?=$v['order']?></span></td>
                <td><?=$v['fakeOrder']?></td>
                <td><?=$v['type_name']?></td>
                <td><?=$v['create_name']?></td>
                <td><?=$v['vatTime']?></td>
                <td>￥<?=$v['vatJine']?></td>
                <td>
                    <input type="button" name="" id="" value="查看票据" onclick="show('light')" />
                </td>
                <td><?=$v['create_name']?></td>
                <td><a <?php echo $v['vatJine'] > 1000? 'href="index.php?r=budget/applyitem&tid='.$v["id"].'" style="color:red;"': 'href=""'  ?>><?=$v['vatJine'] > 1000?'pc端报销':'app端报销' ?></a></td>
            </tr>
                <!--弹出框-->
                <div id="light" class="white_content">
                    <div class="close">
                        <img src="images/close.png" onclick="hide('light')">
                    </div>
                    <img src="<?=$v['image'];?>">
                </div>
            <?php } ?>
            </tbody>
        </table>
    </div>
</div>
</body>
</html>


<?php exit;?>
